from Tkinter import Menubutton, Menu

class FullMenu(Menubutton):
    """This is a regular menu button, but it automatically creates and links a menu to the button.
    This is useful because it is needed all the time, so it simplifies the creation of menus.
    """
    def __init__(self, master, name, tearoff=False):
        Menubutton.__init__(self, master, text=name)
        self.menu = Menu(self, tearoff=tearoff)
        self.configure(menu=self.menu)
        
